<section class="gh-canvas">
    <form class="mb15" {{action (perform "save") on="submit"}}>
        <GhCanvasHeader class="gh-canvas-header">
            <h2 class="gh-canvas-title" data-test-screen-title>
                {{#link-to "tags.index" data-test-link="tags-back"}}Tags{{/link-to}}
                <span>{{svg-jar "arrow-right"}}</span>
                {{if tag.name tag.name "New tag"}}
            </h2>
            <section class="view-actions">
                {{gh-task-button task=save class="gh-btn gh-btn-blue gh-btn-icon" data-test-button="save"}}
            </section>
        </GhCanvasHeader>
        {{gh-tag-settings-form tag=tag
            setProperty=(action "setProperty")
            showDeleteTagModal=(action "toggleDeleteTagModal")}}
    </form>
    <button class="gh-btn gh-btn-red gh-btn-icon mb15" {{action "toggleDeleteTagModal"}}>
        <span>Delete tag</span>
    </button>
</section>

{{#if showUnsavedChangesModal}}
    {{gh-fullscreen-modal "leave-settings"
        confirm=(action "leaveScreen")
        close=(action "toggleUnsavedChangesModal")
        modifier="action wide"}}
{{/if}}

{{#if showDeleteTagModal}}
{{gh-fullscreen-modal "delete-tag"
    model=tag
    confirm=(action "deleteTag")
    close=(action "toggleDeleteTagModal")
    modifier="action wide"}}
{{/if}}